package com.test.easyexcel.entity.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import lombok.Data;

import java.util.Date;

/**
 * @author 3489309323@qq.com
 * @create 2020-07-09-13:01
 */
@Data
public class ExcelStudentData {
  @ExcelProperty(value = "姓名", index = 1)
  private String name;

  @ExcelProperty(value = "生日", index = 2)
  @DateTimeFormat("yyyy年MM月dd日 HH时mm分ss秒")
  private Date birthday;

  @ExcelProperty(value = "薪资", index = 4)
  @NumberFormat("#.##") //一个#保留一位小数 两个就保留两位
  private Double salary;

  /**
   * 忽略这个字段
   */
  @ExcelIgnore
  private String password;
}
